package com.jy.rhin.facade.infra.controller.dto;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.ToStringSerializer;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jy.framework.base.entity.ValidationConstant;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Date;

@Data
@NoArgsConstructor
public class CDADocumentTemplateDto {

    @JSONField(serializeUsing = ToStringSerializer.class)
    private Long id;

    @NotEmpty(message = ValidationConstant.NOT_EMPTY)
    @ApiModelProperty(value = "模板编号")
    private String templateNo;

    @NotEmpty(message = ValidationConstant.NOT_EMPTY)
    @ApiModelProperty(value = "模板名称")
    private String templateName;

    @NotEmpty(message = ValidationConstant.NOT_EMPTY)
    @ApiModelProperty(value = "版本号")
    private String version;

    @ApiModelProperty(value = "模板节点")
    private String templateNodes;

    @NotNull(message = ValidationConstant.NOT_EMPTY)
    @ApiModelProperty(value = "模板节点Json")
    private CDADocumentTemplateNodeDto templateNodesJson;

    @ApiModelProperty(value = "模板内容")
    private String templateContent;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @ApiModelProperty(value = "作废标志")
    private String zuoFeiBZ;

}
